package com.pjnkj.thunder.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author pjnkj
 * @since 2022-01-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Shop对象", description="")
public class Shop extends Model<Shop> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "店家标题")
    private String title;

    @ApiModelProperty(value = "店家描述")
    private String content;

    @ApiModelProperty(value = "店家分类")
    private Integer shoptype;

    @ApiModelProperty(value = "宣传图")
    private String img;

    @ApiModelProperty(value = "背景图")
    private String bgimg;

    @ApiModelProperty(value = "商标图")
    private String bqimg;

    @ApiModelProperty(value = "店家状态1开业2关闭3打烊")
    private Integer status;

    @ApiModelProperty(value = "商店类型1美团2饿了么")
    private Integer type;

    @ApiModelProperty(value = "商家合作链接")
    private String link;

    @ApiModelProperty(value = "维度")
    private String longitude;

    @ApiModelProperty(value = "经度")
    private String latitude;

    @ApiModelProperty(value = "删除")
    @TableLogic
    private Integer deleted;

    @JSONField(serialize = false)
    @ApiModelProperty(value = "抢单时间")
    @TableField(value = "createTime", fill = FieldFill.INSERT)
    private Date createTime;

    @JSONField(serialize = false)
    @ApiModelProperty(value = "更新状态时间")
    @TableField(value = "lastModifiedTime", fill = FieldFill.INSERT_UPDATE)
    private Date lastModifiedTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
